package com.sunshineedu.sunshineeducationspring.controller;

import com.sunshineedu.sunshineeducationspring.entity.Course;
import com.sunshineedu.sunshineeducationspring.service.CourseService;
import jakarta.annotation.Resource;
import org.springframework.web.bind.annotation.*;

@RestController
@RequestMapping("/Course")
@CrossOrigin("*")
public class CourseController {

    @Resource
    CourseService courseService;

    @PostMapping("/id={id}")
    public Course findNameById(@PathVariable Integer id){
        return courseService.findNameById(id);
    }
}
